/* ===== 1. ROOT VARIABLES & GENERAL STYLES ===== */
:root {
    --bg-color: #111827;
    --card-color: #1F2937;
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --accent-color: #22D3EE;
    --accent-gradient: linear-gradient(45deg, var(--accent-color), #4f46e5);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
}

/* Custom Scrollbar */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: var(--bg-color);
}
body::-webkit-scrollbar-thumb {
    background-color: var(--card-color);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* ===== 2. NAVIGATION BAR ===== */
.navbar {
    transition: all 0.3s ease-in-out;
}
.navbar.scrolled {
    background-color: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.5rem;
}
.nav-link:hover {
    color: var(--text-primary);
}
.nav-link.active {
    color: var(--accent-color);
    font-weight: bold;
}
.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-collapse {
    padding: 1rem 0;
}

/* ===== 3. CUSTOM BUTTON & FORM STYLES ===== */
.btn-accent {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.btn-accent:hover {
    color: var(--text-primary);
    box-shadow: 0 0 25px 0 rgba(34, 211, 238, 0.5);
    transform: translateY(-3px);
}
.form-control {
    background-color: var(--card-color);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
}
.form-control::placeholder { color: var(--text-secondary); }
.form-control:focus {
    background-color: var(--card-color);
    color: var(--text-primary);
    box-shadow: none;
    border-color: var(--accent-color);
}

/* ===== 4. HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.animated-headline, .animated-subheadline, .animated-cta {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
.animated-subheadline { animation-delay: 0.2s; }
.animated-cta { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.background-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.background-shapes::before, .background-shapes::after { content: ''; position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%); animation: float 15s infinite ease-in-out; }
.background-shapes::before { width: 300px; height: 300px; top: 10%; left: 15%; }
.background-shapes::after { width: 400px; height: 400px; bottom: 5%; right: 10%; animation-delay: 3s; animation-duration: 20s; }
@keyframes float { 0% { transform: translate(0, 0); } 50% { transform: translate(30px, 60px); } 100% { transform: translate(0, 0); } }

/* ===== 5. SERVICES SECTION ===== */
.service-card {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.service-card::before { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-25deg); transition: left 0.6s ease; }
.service-card:hover::before { left: 130%; }
.icon-wrapper { width: 60px; height: 60px; margin: 0 auto; background: var(--accent-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

/* ===== 6. WORK/PORTFOLIO SECTION ===== */
.portfolio-item { position: relative; overflow: hidden; border-radius: 12px; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(17, 24, 39, 0.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; opacity: 0; transition: opacity 0.4s ease; }
.portfolio-item:hover .overlay { opacity: 1; }
.overlay h5 { transform: translateY(20px); transition: transform 0.4s ease 0.1s; }
.overlay p { margin-bottom: 0; color: var(--text-secondary); transform: translateY(20px); transition: transform 0.4s ease 0.2s; }
.portfolio-item:hover .overlay h5, .portfolio-item:hover .overlay p { transform: translateY(0); }

/* ===== 7. SCROLL REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal .service-card, .reveal .portfolio-item { transition-delay: var(--delay, 0s); }

/* ===== 8. BACK TO TOP BUTTON ===== */
.back-to-top-btn { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; background: var(--accent-gradient); color: var(--text-primary); display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.5rem; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, transform 0.3s; transform: translateY(20px); z-index: 1000; }
.back-to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top-btn:hover { color: white; box-shadow: 0 0 15px rgba(34, 211, 238, 0.6); }

/* ===== 9. FOOTER ===== */
footer { background-color: var(--card-color); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.social-icon { color: var(--text-secondary); font-size: 1.25rem; margin-left: 1rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { color: var(--accent-color); transform: translateY(-3px); }

/* ===== 10. RESPONSIVENESS (NEW) ===== */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }
    .nav-link {
        padding: 0.8rem 0;
    }
    .navbar-collapse {
        background: rgba(31, 41, 55, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px;
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 767.98px) {
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .hero-section h1 {
        font-size: 2.5rem; /* Scale down heading on mobile */
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .background-shapes::before {
        width: 150px;
        height: 150px;
        top: 5%;
    }
    .background-shapes::after {
        width: 200px;
        height: 200px;
        bottom: 5%;
        right: -10%;
    }
    footer {
        text-align: center;
    }
    .social-icon {
        margin: 0 0.5rem;
    }
}